package org.tamal;

/**
 * This class contains all the constants used in this application.
 * @author Tamal Kanti Nath
 */
public final class Constants {

    /**
     * The Message bundle name.
     */
    public static final String MSG = "msg";

    /**
     * Google Open Authentication token URL.
     */
    public static final String GOOGLE_TOKEN
        = "https://accounts.google.com/o/oauth2/token";

    /**
     * Google information URL.
     */
    public static final String GOOGLE_URL
        = "https://www.googleapis.com/oauth2/v1/userinfo";

    /**
     * Client ID for google open authentication.
     */
    public static final String GOOGLE_ID = "856180561033-b6l912i61c0ak769cb78i9b80fni79nm.apps.googleusercontent.com";

    /**
     * Client secret for google open authentication.
     */
    public static final String GOOGLE_SECRET = "korDNyOSvMrRwOBE-h8ZL9T_";

    /**
     * Scope for google open authentication.
     */
    public static final String GOOGLE_SCOPE = "https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email";

    /**
     * State for google open authentication.
     */
    public static final char GOOGLE_STATE = 'g';

    /**
     * Google Open Authentication token URL.
     */
    public static final String FACEBOOK_TOKEN
        = "https://graph.facebook.com/oauth/access_token";

    /**
     * FaceBook information URL.
     */
    public static final String FACEBOOK_URL = "https://graph.facebook.com/me";

    /**
     * Client ID for google open authentication.
     */
    public static final String FACEBOOK_ID = "396368550423650";

    /**
     * Client secret for google open authentication.
     */
    public static final String FACEBOOK_SECRET
        = "7a2d5b86bdbdbb2725e5eb5be5855782";

    /**
     * Scope for google open authentication.
     */
    public static final String FACEBOOK_SCOPE = "email";

    /**
     * State for google open authentication.
     */
    public static final char FACEBOOK_STATE = 'f';

    /**
     * The redirect URI.
     */
    public static final String REDIRECT_URI
        = "http://localhost:8080/LoginServlet";

    /**
     * SMTP host name.
     */
    public static final String SMTP_HOST = "smtp.mail.yahoo.com";

    /**
     * SMTP port number.
     */
    public static final String SMTP_PORT = "587";

    /**
     * The user name / email id for mail account.
     */
    public static final String MAIL_ID = "TamalKantiNath@yahoo.com";

    /**
     * The personal name for {@link #MAIL_ID}.
     */
    public static final String MAIL_PERSONAL = "Web Application team";

    /**
     * The email template file path.
     */
    public static final String MAIL_TEMPLATE
        = "src/main/webapp/WEB-INF/content/email-template.html";

    /**
     * The email template file path.
     */
    public static final String MAIL_IMAGE
        = "src/main/webapp/content/bullet.png";

    /**
     * Maximum number of login attempts allowed before the account gets locked.
     */
    public static final int MAX_LOGIN_ATTEMPT = 3;

    /**
     * The retry duration for login for a locked account.
     */
    public static final long RETRY_INTERVAL = 1000L * 60 * 60 * 24;

    /**
     * The duration for password expire.
     */
    public static final long PASSWORD_EXPIRE = 1000L * 60 * 60 * 24 * 30;

    private Constants() {
        // Empty
    }

}
